<?php

class ui_input_checkbox extends ui
{
	function __construct($name,$checked=false)
	{
		global $ti;
		$this->init(
			__FILE__,
			'input',
			array(
				'type'=>'checkbox',
				'name'=>$name,
				'checked'=>$checked,
				'class'=>'input input_check',
			),
			true
		);
	}
	
	
	function set_checked($state=true)
	{
		if($state)
		{
			$this->attributes['checked']='checked';
		}
		else
		{
			unset($this->v['checked']);
		}
	}
}

?>